package com.feicheng.house.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.feicheng.house.entity.Card;
import com.feicheng.house.entity.Price;
import com.feicheng.house.exception.SystemException;
import com.feicheng.house.result.ResultInfo;
import com.feicheng.house.service.ICardService;
import com.feicheng.house.service.IPriceService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author feichengTech
 * @since 2021-11-20
 */
@RestController
@RequestMapping("/house/price")
public class PriceController {
	@Autowired
	IPriceService priceService;

	/**
	 * 修改价格
	 * @param price
	 * @return Boolean值
	 */
	@PutMapping("/info")
	public ResultInfo updateCard(Price price) {
		
		return priceService.updatePrice(price);
	}
	 
	/**
	 * 查询价格
	 * @return 一条单价
	 */
	@GetMapping("/info")
	public ResultInfo getOneCard() {
		return priceService.getOnePrice();
	}
	
	

}

